package com.product.dao;

import com.product.entity.Product;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ProductDao {
    @Select("select * from product limit 15")
    List<Product> selectProduct();

    @Select("SELECT * from product where name like concat('%',#{name},'%') limit 15")
    List<Product> selectProductByName(@Param("name") String name);
}
